#ifndef __DECLARES_H__
#define __DECLARES_H__

#include <systemd/sd-journal.h>
#include <stdio.h>
#include <sys/types.h>

// #define PRINTF

#if defined PRINTF
#define DEBUG(fmt, ...)       \
  printf(fmt, ##__VA_ARGS__); \
  printf("\n")
#else
#define DEBUG(fmt, ...) sd_journal_print(LOG_DEBUG, fmt, ##__VA_ARGS__)
#endif

typedef pid_t (*work)(void);
typedef void (*cleanup)(void);

extern work start_work;
extern cleanup clean;

extern const char *home_dir;
extern const char *mode;

extern int started;

#endif